package com.hc.server.user.service.adapter;

import cn.hutool.core.bean.BeanUtil;
import com.hc.server.user.domain.vo.response.user.UserInfoResp;
import com.hc.server.user.domain.entity.User;
import lombok.extern.slf4j.Slf4j;

/**
 * 用户适配器
 * Created by wdj on 2024/10/17
 */

@Slf4j
public class UserAdapter {

    public static UserInfoResp buildUserInfoResp(User userInfo, Integer countByValidItemId){
        UserInfoResp userInfoResp = new UserInfoResp();
        BeanUtil.copyProperties(userInfo, userInfoResp);
        userInfoResp.setModifyNameChance(countByValidItemId);
        return userInfoResp;
    }
}
